<template>
    <div>
        <!-- 底部导航栏 -->
        <van-tabbar v-model="active" active-color="#ff5733">
            <van-tabbar-item name="home" icon="home-o">首页</van-tabbar-item>
            <van-tabbar-item name="classify" icon="apps-o">分类</van-tabbar-item>
            <van-tabbar-item name="shopcart" icon="shopping-cart-o">购物车</van-tabbar-item>
            <van-tabbar-item name="mine" icon="friends-o">我的</van-tabbar-item>
        </van-tabbar>
    </div>
</template>
<script>
export default {
    name: "bottom",
    data() {
        return {
            active: ""
        };
    },
    watch: {
        active: function() {
            console.log(this.active);
            this.$router.push({ name: this.active });
        }
    }
};
</script>
<style scoped lang="">

</style>